/* SmoothMaths Frontend - Product Page Login Requirements */

/* Login Required Message Styling */
.smoothmaths-login-required {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 20px !important;
    margin: 20px 0 !important;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.smoothmaths-login-required strong {
    font-size: 1.2em;
    display: block;
    margin-bottom: 8px;
}

.smoothmaths-login-required a {
    color: #ffeb3b !important;
    text-decoration: none;
    font-weight: bold;
    border-bottom: 2px solid #ffeb3b;
    padding-bottom: 2px;
    transition: all 0.3s ease;
}

.smoothmaths-login-required a:hover {
    color: #fff !important;
    border-bottom-color: #fff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

/* Login Button Styling */
.smoothmaths-login-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 25px !important;
    padding: 12px 30px !important;
    font-size: 16px !important;
    font-weight: bold !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4) !important;
    display: inline-block !important;
    text-align: center !important;
    min-width: 200px !important;
}

.smoothmaths-login-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6) !important;
    color: white !important;
}

.smoothmaths-login-button:active {
    transform: translateY(0) !important;
}

/* Hide add-to-cart button for non-logged users */
.smoothmaths-login-required-page .single_add_to_cart_button,
.smoothmaths-login-required-page button[name="add-to-cart"],
.smoothmaths-login-required-page .add_to_cart_button,
.smoothmaths-login-required-page .ajax_add_to_cart,
.smoothmaths-login-required-page .wc-forward,
.smoothmaths-login-required-page button[type="submit"][value*="add"],
.smoothmaths-login-required-page input[name="add-to-cart"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Membership Notice Styling */
.smoothmaths-membership-notice {
    background: #e3f2fd !important;
    border-left: 4px solid #2196f3 !important;
    padding: 15px !important;
    margin: 15px 0 !important;
    border-radius: 0 4px 4px 0 !important;
    color: #1565c0 !important;
}

.smoothmaths-membership-notice strong {
    color: #0d47a1 !important;
}

.smoothmaths-membership-notice a {
    color: #1976d2 !important;
    font-weight: bold !important;
    text-decoration: none !important;
}

.smoothmaths-membership-notice a:hover {
    color: #0d47a1 !important;
    text-decoration: underline !important;
}

/* Print Options Styling (when user is logged in) */
.smoothmaths-print-options {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
}

.smoothmaths-print-options h4 {
    margin-top: 0;
    color: #495057;
}

/* Responsive Design */
@media (max-width: 768px) {
    .smoothmaths-login-required {
        margin: 15px -10px !important;
        border-radius: 0 !important;
        padding: 15px !important;
    }
    
    .smoothmaths-login-button {
        width: 100% !important;
        margin-top: 10px !important;
    }
}

/* Animation for login required message */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.smoothmaths-login-required {
    animation: fadeInUp 0.5s ease-out;
}

/* Loading state for when redirecting */
.smoothmaths-redirecting {
    opacity: 0.7;
    pointer-events: none;
}

.smoothmaths-redirecting::after {
    content: "Redirecting...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: bold;
}

/* View Cart Button Styling */
.smoothmaths-view-cart-btn {
    display: inline-block;
    background: #0073aa !important;
    color: white !important;
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none !important;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
    text-align: center;
}

.smoothmaths-view-cart-btn:hover {
    background: #005a87 !important;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 115, 170, 0.3);
}

.smoothmaths-view-cart-btn:active {
    transform: translateY(0);
}

/* Cart Success Message */
.smoothmaths-cart-success {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
