/* Jazpiper Redemption Form Styles */

/* Container */
.jazpiper-redemption-form-wrapper {
    max-width: 800px;
    margin: 0;
    padding: 0;
}

.jazpiper-form-container {
    background: #ffffff;
    border-radius: 8px;
    padding: 0px;
    box-shadow: none !important;
}

/* Title */
.jazpiper-form-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 10px;
    color: #111d29;
}

.jazpiper-form-subtitle {
    font-size: 16px;
    color: #666;
    margin: 0 0 30px;
}

/* Section */
.jazpiper-form-section {
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 10px;
}

.jazpiper-form-section:last-of-type {
    border-bottom: none;
}

.jazpiper-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 0px;
    margin: 0 0 20px;
    color: #000000;
    text-transform: none;
}

.jazpiper-icon {
    width: 20px;
    height: 20px;
}

/* Form Elements */
.jazpiper-form-group {
    margin-bottom: 20px;
}

.jazpiper-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #394e66;
    position: relative;
}

.jazpiper-label-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.jazpiper-label-wrapper label {
    display: inline-block;
    margin-bottom: 0;
}

.jazpiper-help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-left: 5px;
    color: #394e66;
    cursor: pointer;
    transition: transform 0.3s;
    vertical-align: middle;
}

.jazpiper-help-icon:hover {
    color: #394e66;
    transform: scale(1.1);
}

.jazpiper-help-icon svg {
    width: 16px;
    height: 16px;
}

.jazpiper-form-group .required {
    color: #e74c3c;
}

.jazpiper-form-group input[type="text"],
.jazpiper-form-group input[type="email"],
.jazpiper-form-group input[type="number"],
.jazpiper-form-group select,
.jazpiper-form-group textarea {
    width: 100%;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.jazpiper-form-group input:focus,
.jazpiper-form-group select:focus,
.jazpiper-form-group textarea:focus {
    outline: none;
    border-color: #e74c3c;
}

.jazpiper-form-group textarea {
    resize: vertical;
    font-family: inherit;
}

/* Two Column Layout */
.jazpiper-form-row {
    display: flex;
    gap: 20px;
    margin: 0 -10px;
}

.jazpiper-col-half {
    flex: 1;
    padding: 0 10px;
}

/* File Upload */
.jazpiper-upload-area {
    position: relative;
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.3s;
    background: #fafafa;
    min-height: 120px;
    display: block;
    cursor: pointer;
}

/* Compact upload area for MAC Number */
#mac-number-upload-area {
    padding: 10px 15px;
    min-height: auto;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
}

.jazpiper-upload-area:hover {
    border-color: #e74c3c;
    background: #fff;
}

.jazpiper-upload-area.drag-over {
    border-color: #e74c3c;
    background: #fff8f8;
}

.jazpiper-upload-area.has-file {
    border-color: #27ae60;
    background: #f0fff4;
}

.jazpiper-file-input {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}

.jazpiper-upload-content {
    pointer-events: none;
    position: relative;
    z-index: 1;
    width: 100%;
}

#mac-number-upload-area .jazpiper-upload-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.jazpiper-upload-icon {
    width: 32px;
    height: 32px;
    margin: 0 auto 10px;
    color: #999;
}

#mac-number-upload-area .jazpiper-upload-icon {
    width: 20px;
    height: 20px;
    margin: 0;
    flex-shrink: 0;
}

.jazpiper-upload-text {
    font-size: 14px;
    color: #666;
    margin: 0;
}

#mac-number-upload-area .jazpiper-upload-text {
    font-size: 14px;
    margin: 0;
}

.jazpiper-upload-filename {
    font-size: 13px;
    color: #27ae60;
    font-weight: 600;
    margin-top: 8px;
    display: none;
    word-break: break-all;
}

/* Checkbox */
.jazpiper-checkbox-group {
    margin: 25px 0;
}

.jazpiper-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
}

.jazpiper-checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.jazpiper-checkbox-label span {
    flex: 1;
    color: #333;
}

.jazpiper-tnc-link {
    color: #ec3136;
    text-decoration: none;
}

.jazpiper-tnc-link:hover {
    text-decoration: underline;
}

.jazpiper-link {
    color: #e74c3c;
    text-decoration: none;
}

.jazpiper-link:hover {
    text-decoration: underline;
}

/* Math Verification */
.jazpiper-math-verification-wrapper {
    display: flex;
    gap: 20px;
    align-items: center;
}

.jazpiper-math-question {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 6px 16px;
    text-align: center;
    flex: 1;
}

.math-question-text {
    font-size: 16px;
    font-weight: 500;
    color: #394e66;
    display: block;
}

.jazpiper-form-group input[type="number"]#math_answer {
    max-width: 200px;
    text-align: center;
    font-size: 14px;
    font-weight: 400;
    padding: 10px;
    margin: 0;
}

/* Submit Button */

.jazpiper-submit-btn {
    width: 100%;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff !important;
    background: #ec3136 !important;
    border: none;
    border-radius: 1000px !important;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.jazpiper-submit-btn:hover {
    background: #d32025 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(236, 49, 54, 0.3);
}

.jazpiper-submit-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

/* Loader Animation */
.btn-loader {
    display: inline-block;
}

.spinner {
    animation: rotate 2s linear infinite;
    width: 20px;
    height: 20px;
}

.spinner .path {
    stroke: #ffffff;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* Messages */
.jazpiper-form-message {
    margin-top: 20px;
    padding: 15px 20px;
    border-radius: 4px;
    font-size: 14px;
    display: none;
}

.jazpiper-form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.jazpiper-form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Terms & Conditions Modal */
.jazpiper-tnc-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
}

.jazpiper-tnc-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border: none;
    width: 90%;
    max-width: 800px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.jazpiper-tnc-modal-header {
    padding: 20px 30px;
    color: white;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.jazpiper-tnc-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.jazpiper-tnc-modal-close {
    color: black;
    font-size: 32px;
    font-weight: bold;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    transition: color 0.3s;
}

.jazpiper-tnc-modal-close:hover,
.jazpiper-tnc-modal-close:focus {
    color: #ec3136;
}

.jazpiper-tnc-modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.jazpiper-tnc-modal-body h3 {
    color: #111d29;
    font-size: 18px;
    font-weight: 600;
    margin: 20px 0 10px 0;
}

.jazpiper-tnc-modal-body h3:first-child {
    margin-top: 0;
}

.jazpiper-tnc-modal-body p {
    color: #394e66;
    line-height: 1.6;
    margin-bottom: 15px;
}

.jazpiper-tnc-modal-body ul,
.jazpiper-tnc-modal-body ol {
    color: #394e66;
    line-height: 1.6;
    margin-bottom: 15px;
    padding-left: 25px;
}

.jazpiper-tnc-modal-body li {
    margin-bottom: 8px;
}

.jazpiper-tnc-modal-footer {
    padding: 20px 30px;
    background-color: #f8f9fa;
    border-radius: 0 0 8px 8px;
    text-align: center;
}

#jazpiper-tnc-accept-btn {
    background-color: #ec3136;
    color: white;
    padding: 12px 40px;
    border: none;
    border-radius: 1000px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

#jazpiper-tnc-accept-btn:hover {
    background-color: #d12a2f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(236, 49, 54, 0.3);
}

/* MAC Number Image Modal */
.jazpiper-image-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

.jazpiper-image-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 600px;
    width: calc(100% - 40px);
}

.jazpiper-image-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    color: white;
    font-size: 32px;
    font-weight: normal;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10001;
    background-color: rgba(0, 0, 0, 0.5);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.jazpiper-image-modal-close:hover,
.jazpiper-image-modal-close:focus {
    color: #ec3136;
    background-color: rgba(0, 0, 0, 0.7);
}

.jazpiper-mac-image {
    max-width: 600px;
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    display: block;
}

@media (max-width: 768px) {
    .jazpiper-image-modal-content {
        max-width: 90%;
        width: 90%;
    }
    
    .jazpiper-mac-image {
        max-width: 100%;
    }
}

/* Field error styling */
.jazpiper-field-error,
input.jazpiper-field-error,
select.jazpiper-field-error,
textarea.jazpiper-field-error {
    border-color: #ec3136 !important;
    background-color: #fff5f5 !important;
}

.jazpiper-upload-area.jazpiper-field-error {
    border-color: #ec3136 !important;
    background-color: #fff5f5 !important;
}

/* Responsive Design */
@media (max-width: 768px) {

    
    .jazpiper-form-title {
        font-size: 24px;
    }
    
    .jazpiper-form-row {
        flex-direction: column;
        gap: 0;
        margin: 0;
    }
    
    .jazpiper-col-half {
        padding: 0;
    }
    
    .jazpiper-upload-area {
        padding: 20px 15px;
    }
    
    .jazpiper-form-footer {
        padding: 0;
    }
    
    /* Math verification mobile */
    .jazpiper-math-verification-wrapper {
        flex-direction: column;
        gap: 12px;
    }
    
    .jazpiper-math-question {
        width: 100%;
    }
    
    .jazpiper-form-group input[type="number"]#math_answer {
        max-width: 100%;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .jazpiper-redemption-form-wrapper {
        padding: 0 10px;
        margin: 20px auto;
    }

    
    .jazpiper-form-footer {
        padding: 0;
    }
    
    /* Modal responsive for small screens */
    .jazpiper-tnc-modal-content {
        width: 95%;
        margin: 10% auto;
        max-height: 85vh;
    }
    
    .jazpiper-tnc-modal-header {
        padding: 15px 20px;
    }
    
    .jazpiper-tnc-modal-header h2 {
        font-size: 20px;
    }
    
    .jazpiper-tnc-modal-body {
        padding: 20px;
    }
    
    .jazpiper-tnc-modal-footer {
        padding: 15px 20px;
    }
    
    #jazpiper-tnc-accept-btn {
        padding: 10px 30px;
        font-size: 14px;
    }
}
