/**
 * BST MarianaTek Registration Form Styles
 * Uses theme's default color scheme and fonts
 */

.bst-mt-registration-wrapper {
    max-width: 500px;
    margin: 20px auto;
    padding: 30px 0;
    background: var(--wp--preset--color--white, #fff);
    border-radius: 0;
    box-shadow: none;
}

/* Messages */
.bst-mt-message {
    padding: 15px;
    margin-top: 20px;
    margin-bottom: 20px;
    border-radius: 0;
    border-left: 4px solid;
}

/* Error message inside form (below button) */
.bst-mt-registration-form .bst-mt-message {
    margin-top: 20px;
    margin-bottom: 0;
}

.bst-mt-message.bst-mt-success {
    background-color: #d4edda;
    border-color: var(--wp--preset--color--primary, #c8b273);
    color: #155724;
}

.bst-mt-message.bst-mt-error {
    background-color: #fde18e;
    border-color: #dc3545;
    color: #721c24;
}
.bst-mt-message.bst-mt-error a {
    color: #302403 !important;
}

.bst-mt-message p {
    margin: 0;
    font-family: var(--wp--preset--font-family--gt-pressura-standard, sans-serif);
}

/* Form Styles */
.bst-mt-registration-form {
    width: 100%;
}

.bst-mt-registration-form .form-row {
    margin-bottom: 20px;
    display: block;
    align-items: center;
}

.bst-mt-registration-form label {
    width: 100%;
    display: block;
    margin-bottom: 6px;
    font-family: var(--wp--preset--font-family--gt-pressura-standard, sans-serif);
    font-weight: 400;
    font-size: 16px;
    color: var(--wp--preset--color--black, #000);
}

.bst-mt-registration-form input[type="text"],
.bst-mt-registration-form input[type="email"],
.bst-mt-registration-form input[type="tel"] {
    width: 100%;
    padding: 4px 12px;
    line-height: 30px;
    border: 1px solid #D0D0D0;
    border-radius: 0;
    font-family: var(--wp--preset--font-family--gt-pressura-standard, sans-serif);
    font-size: var(--wp--preset--font-size--body, 16px);
    color: var(--wp--preset--color--black, #000);
    transition: border-color 0.3s;
}

.bst-mt-registration-form input:focus {
    outline: none;
    border-color: var(--wp--preset--color--primary, #c8b273);
    box-shadow: 0 0 0 1px var(--wp--preset--color--primary, #c8b273);
}

/* Checkbox Styles */
.bst-mt-registration-form .form-row-checkbox {
    margin-bottom: 25px;
}

.bst-mt-registration-form .checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    margin-bottom: 0;
}

.bst-mt-registration-form .checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
    margin-top: 3px;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: var(--wp--preset--color--primary, #c8b273);
}

.bst-mt-registration-form .checkbox-label span {
    font-family: var(--wp--preset--font-family--gt-pressura-standard, sans-serif);
    font-size: 14px;
    line-height: 1.5;
    color: var(--wp--preset--color--black, #000);
}

.bst-mt-registration-form .checkbox-label a {
    color: var(--wp--preset--color--primary, #c8b273);
    text-decoration: underline;
}

.bst-mt-registration-form .checkbox-label a:hover {
    opacity: 0.8;
}

.bst-mt-submit-btn {
    width: 100%;
    padding: 10px 25px;
    background: var(--wp--preset--color--primary, #c8b273);
    color: var(--wp--preset--color--white, #fff);
    border: none;
    border-radius: 0;
    font-family: var(--wp--preset--font-family--gt-pressura-standard, sans-serif);
    font-size: var(--wp--preset--font-size--button, 16px);
    font-weight: 400;
    letter-spacing: 3.2px;
    line-height: 25px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.3s;
}

.bst-mt-submit-btn:hover {
    opacity: 0.9;
}

.bst-mt-submit-btn:active {
    transform: scale(0.98);
}

/* Success Page Styles */
.bst-mt-success-wrapper {
    max-width: 600px;
    margin: 20px auto;
    padding: 30px;
}

.bst-mt-success-wrapper h3 {
    margin-top: 0;
    font-family: var(--wp--preset--font-family--hv-philosykos, serif);
    color: var(--wp--preset--color--primary, #c8b273);
}

.bst-mt-user-details {
    margin-top: 30px;
    padding: 20px;
    background: var(--wp--preset--color--secondary, #f3f2f6);
    border-radius: 0;
}

.bst-mt-user-details h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-family: var(--wp--preset--font-family--hv-philosykos, serif);
    color: var(--wp--preset--color--black, #000);
}

.bst-mt-user-details table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--wp--preset--font-family--gt-pressura-standard, sans-serif);
}

.bst-mt-user-details th,
.bst-mt-user-details td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.bst-mt-user-details th {
    font-weight: 400;
    width: 30%;
    color: var(--wp--preset--color--black, #000);
}

.bst-mt-user-details tr:last-child th,
.bst-mt-user-details tr:last-child td {
    border-bottom: none;
}

/* Login Status */
.bst-mt-logged-in {
    padding: 10px 15px;
    background: #d4edda;
    border-left: 4px solid var(--wp--preset--color--primary, #c8b273);
    border-radius: 0;
    color: #155724;
    font-family: var(--wp--preset--font-family--gt-pressura-standard, sans-serif);
}

.bst-mt-logged-out {
    padding: 10px 15px;
    background: #f8d7da;
    border-left: 4px solid #dc3545;
    border-radius: 0;
    color: #721c24;
    font-family: var(--wp--preset--font-family--gt-pressura-standard, sans-serif);
}

/* Payment Form Styles */
.bst-mt-payment-wrapper {
    max-width: 600px;
    margin: 20px auto;
    padding: 30px;
    background: var(--wp--preset--color--white, #fff);
    border-radius: 0;
    box-shadow: none;
}

.bst-mt-user-welcome {
    margin-bottom: 30px;
}

.bst-mt-user-welcome h3 {
    margin-top: 0;
    font-family: var(--wp--preset--font-family--hv-philosykos, serif);
    color: var(--wp--preset--color--black, #000);
}

.bst-mt-user-welcome p {
    font-family: var(--wp--preset--font-family--gt-pressura-standard, sans-serif);
    margin-top: 15px;
}

.bst-mt-product-details {
    margin-top: 25px;
    padding: 20px;
    background: var(--wp--preset--color--secondary, #f3f2f6);
    border-left: 4px solid var(--wp--preset--color--primary, #c8b273);
    border-radius: 0;
}

.bst-mt-cart-title {
    font-family: var(--wp--preset--font-family--hv-philosykos, serif);
    font-size: 20px;
    font-weight: 600;
    color: var(--wp--preset--color--black, #000);
    margin: 0 0 15px 0;
    padding: 0;
    border: none;
}

.bst-mt-cart-item, .bst-mt-cart-subtotal, .bst-mt-cart-tax{
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.bst-mt-item-name {
    font-family: var(--wp--preset--font-family--gt-pressura-standard, sans-serif);
    font-size: 16px;
    color: var(--wp--preset--color--black, #000);
}

.bst-mt-item-price {
    font-family: var(--wp--preset--font-family--gt-pressura-standard, sans-serif);
    font-size: 16px;
    color: var(--wp--preset--color--black, #000);
}

.bst-mt-cart-divider {
    height: 1px;
    background: #D0D0D0;
    margin: 15px 0;
}

.bst-mt-cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
}

.bst-mt-total-label {
    font-family: var(--wp--preset--font-family--gt-pressura-standard, sans-serif);
    font-size: 18px;
    font-weight: 700;
    color: var(--wp--preset--color--black, #000);
}

.bst-mt-total-price {
    font-family: var(--wp--preset--font-family--gt-pressura-standard, sans-serif);
    font-size: 20px;
    font-weight: 700;
    color: var(--wp--preset--color--primary, #c8b273);
}

.bst-mt-product-name {
    font-family: var(--wp--preset--font-family--gt-pressura-standard, sans-serif);
    font-size: 18px;
    font-weight: 600;
    color: var(--wp--preset--color--black, #000);
    margin: 0 0 10px 0;
}

.bst-mt-product-price {
    font-family: var(--wp--preset--font-family--gt-pressura-standard, sans-serif);
    font-size: 24px;
    font-weight: 700;
    color: var(--wp--preset--color--primary, #c8b273);
    margin: 0;
}

.bst-mt-payment-form h4 {
    margin-top: 25px;
    margin-bottom: 15px;
    font-family: var(--wp--preset--font-family--hv-philosykos, serif);
    color: var(--wp--preset--color--black, #000);
    border-bottom: 2px solid var(--wp--preset--color--primary, #c8b273);
    padding-bottom: 8px;
}

.bst-mt-payment-form .form-row {
    margin-bottom: 20px;
    display: block;
    align-items: center;
}

.bst-mt-payment-form .form-row-group {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.bst-mt-payment-form .form-row-half {
    flex: 1;
    margin-bottom: 0;
}

.bst-mt-payment-form label {
    width: 100%;
    display: block;
    margin-bottom: 6px;
    font-family: var(--wp--preset--font-family--gt-pressura-standard, sans-serif);
    font-weight: 400;
    font-size: 16px;
    color: var(--wp--preset--color--black, #000);
}

.bst-mt-payment-form input[type="text"] {
    width: 100%;
    padding: 4px 12px;
    line-height: 30px;
    border: 1px solid #D0D0D0;
    border-radius: 0;
    font-family: var(--wp--preset--font-family--gt-pressura-standard, sans-serif);
    font-size: var(--wp--preset--font-size--body, 16px);
    color: var(--wp--preset--color--black, #000);
    transition: border-color 0.3s;
}

.bst-mt-buy-btn {
    background: var(--wp--preset--color--primary, #c8b273);
    margin-top: 20px;
}

.bst-mt-buy-btn:hover {
    opacity: 0.9;
}

/* Loading Overlay */
.bst-mt-loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99999999999999;
    justify-content: center;
    align-items: center;
}

.bst-mt-loading-overlay.active {
    display: flex;
}

.bst-mt-loading-content {
    text-align: center;
    background: var(--wp--preset--color--white, #fff);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.bst-mt-spinner {
    border: 4px solid rgba(200, 178, 115, 0.2);
    border-top: 4px solid var(--wp--preset--color--primary, #c8b273);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: bst-spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes bst-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.bst-mt-loading-text {
    font-family: var(--wp--preset--font-family--gt-pressura-standard, sans-serif);
    font-size: 18px;
    color: var(--wp--preset--color--black, #000);
    margin: 0;
}

.bst-mt-loading-subtext {
    font-family: var(--wp--preset--font-family--gt-pressura-standard, sans-serif);
    font-size: 14px;
    color: #666;
    margin: 10px 0 0;
}

/* Button disabled state during loading */
.bst-mt-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Card Validation Styles */
.bst-mt-payment-form input.bst-mt-valid {
    border-color: #28a745;
}

.bst-mt-payment-form input.bst-mt-invalid {
    border-color: #dc3545;
}

.bst-mt-validation-error {
    display: block;
    margin-top: 5px;
    font-family: var(--wp--preset--font-family--gt-pressura-standard, sans-serif);
    font-size: 14px;
    color: #dc3545;
}

/* Card number formatting - wider input for spaced format */
#card_number {
    letter-spacing: 0.5px;
}

/* Visual feedback for valid fields */
.bst-mt-payment-form input.bst-mt-valid {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%2328a745" viewBox="0 0 16 16"><path d="M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

/* Visual feedback for invalid fields */
.bst-mt-payment-form input.bst-mt-invalid {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%23dc3545" viewBox="0 0 16 16"><path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM5.354 4.646a.5.5 0 1 0-.708.708L7.293 8l-2.647 2.646a.5.5 0 0 0 .708.708L8 8.707l2.646 2.647a.5.5 0 0 0 .708-.708L8.707 8l2.647-2.646a.5.5 0 0 0-.708-.708L8 7.293 5.354 4.646z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

@media (min-width: 600px) {
    .form-two-col {
        display: flex;
        gap: 20px;
    }

    .form-two-col .form-row {
        flex: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .bst-mt-registration-wrapper,
    .bst-mt-success-wrapper,
    .bst-mt-payment-wrapper {
        padding: 20px;
        margin: 10px;
    }

    .bst-mt-user-details th {
        width: 40%;
    }

    .bst-mt-payment-form .form-row-group {
        flex-direction: column;
        gap: 0;
    }

    .bst-mt-payment-form .form-row-half {
        margin-bottom: 20px;
    }

    .bst-mt-loading-content {
        padding: 30px 20px;
        margin: 20px;
    }
}
