/* date reviewed: 2025-11-07 */
/* score: 8.0 */
/* To-Do: [Good] comprehensive button system (CTA, 3D, variants, states, sizes); [A11y] good focus styles, needs focus-visible; [Enhancement] add disabled styles, loading animation; [Performance] 776 lines (consider splitting by variant); [Consistency] some !important usage (refactor); [Testing] visual regression tests. */

/* CTA Button */
.btn-cta {
    background: var(--blue-de-france);
    color: white;
    border: none;
    padding: 14px 32px;
    min-height: 48px;
    min-width: 180px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    text-decoration: none;
    font-family: inherit;
}

.btn-cta:hover {
    background: #0a6bb8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 133, 216, 0.3);
}

.btn-cta:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(13, 133, 216, 0.2);
}

.btn-cta:focus {
    outline: 2px solid var(--blue-de-france);
    outline-offset: 2px;
}

/* A/B Testing Variant Styles */
.btn-variant-green {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
}

.btn-variant-green:hover {
    background: linear-gradient(135deg, #218838 0%, #1aa179 100%) !important;
    box-shadow: 0 8px 30px rgba(40, 167, 69, 0.3) !important;
}

.btn-variant-red {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
}

.btn-variant-red:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%) !important;
    box-shadow: 0 8px 30px rgba(220, 53, 69, 0.3) !important;
}

.btn-variant-purple {
    background: linear-gradient(135deg, #6f42c1 0%, #5a32a3 100%) !important;
}

.btn-variant-purple:hover {
    background: linear-gradient(135deg, #5a32a3 0%, #4c2a8c 100%) !important;
    box-shadow: 0 8px 30px rgba(111, 66, 193, 0.3) !important;
}

.btn-variant-orange {
    background: linear-gradient(135deg, #fd7e14 0%, #e8590c 100%) !important;
}

.btn-variant-orange:hover {
    background: linear-gradient(135deg, #e8590c 0%, #d44d0a 100%) !important;
    box-shadow: 0 8px 30px rgba(253, 126, 20, 0.3) !important;
}

/* Pricing Button */
.btn-pricing {
    background: var(--blue-de-france);
    color: white;
    border: none;
    padding: 14px 40px;
    min-height: 48px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    text-decoration: none;
    font-family: inherit;
    font-size: 16px;
}

.btn-pricing:hover {
    background: #0a6bb8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 133, 216, 0.3);
}

.btn-pricing:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(13, 133, 216, 0.2);
}

.btn-pricing:focus {
    outline: 2px solid var(--blue-de-france);
    outline-offset: 2px;
}

/* Contact Button */
/* Contact button now uses btn-primary-3d class - see below */
.btn-contact {
    position: relative;
    z-index: 100;
}

/* Submit Button */
.btn-submit {
    background: white;
    color: var(--blue-de-france);
    border: none;
    padding: 16px 40px;
    min-height: 52px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 16px;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.2);
}

.btn-submit .btn-icon {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.btn-submit:hover {
    background: var(--ghost-white);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 255, 255, 0.4);
}

.btn-submit:hover .btn-icon {
    transform: translateX(4px);
}

.btn-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(255, 255, 255, 0.2);
}

.btn-submit:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-submit:disabled .btn-icon {
    display: none;
}

/* Dashboard Buttons */
.btn-primary {
    background: var(--primary-blue, var(--blue-de-france));
    color: var(--white, white);
    border: none;
    border-radius: var(--radius-sm, 6px);
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--primary-blue-dark, #0B6DB0);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 133, 216, 0.3);
}

.btn-secondary {
    background: var(--white, white);
    color: var(--grey-dark, #1C1C1C);
    border: 2px solid var(--grey-lighter, #E8EDF2);
    border-radius: var(--radius-sm, 6px);
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    border-color: var(--primary-blue, var(--blue-de-france));
    color: var(--primary-blue, var(--blue-de-france));
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-full {
    width: 100%;
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--grey-medium, #4F5B67);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm, 6px);
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: var(--grey-lightest, #F8F9FA);
    color: var(--primary-blue, var(--blue-de-france));
}

/* Link Button */
.link-button {
    background: none;
    border: none;
    color: var(--blue-de-france);
    text-decoration: underline;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    padding: 0;
    margin: 0;
    display: inline;
    transition: color 0.2s ease;
}

.link-button:hover {
    color: #0a6bb8;
    text-decoration: none;
}

.link-button:focus {
    outline: 2px solid var(--blue-de-france);
    outline-offset: 2px;
    border-radius: 2px;
}

.link-button:active {
    color: #085a94;
}

/* Modal Submit Button */
.modal-btn-submit {
    background: var(--blue-de-france);
    color: white;
    border: none;
    padding: 12px 32px;
    min-height: 44px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 15px;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    touch-action: manipulation;
}

.modal-btn-submit .btn-icon {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.modal-btn-submit:hover {
    background: #0a6bb8;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(13, 133, 216, 0.3);
}

.modal-btn-submit:hover .btn-icon {
    transform: translateX(4px);
}

.modal-btn-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(13, 133, 216, 0.2);
}

.modal-btn-submit:focus {
    outline: 2px solid var(--blue-de-france);
    outline-offset: 2px;
}

/* Action Button */
.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.25rem 0.75rem;
    background: var(--grey-lightest, #F8F9FA);
    border: 2px solid var(--grey-lighter, #E8EDF2);
    border-radius: var(--radius-md, 8px);
    color: var(--grey-dark, #1C1C1C);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: var(--white, white);
    border-color: var(--primary-blue, var(--blue-de-france));
    color: var(--primary-blue, var(--blue-de-france));
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.action-btn svg {
    color: var(--primary-blue, var(--blue-de-france));
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .btn-cta {
        padding: 16px 36px;
        min-height: 52px;
        font-size: 17px;
        width: 100%;
        max-width: 320px;
    }

    .btn-pricing {
        padding: 16px 40px;
        min-height: 52px;
        font-size: 17px;
    }
    
    .btn-contact {
        padding: 14px 32px;
        min-height: 48px;
    }
    
    .btn-submit {
        padding: 16px 40px;
        min-height: 52px;
        font-size: 17px;
    }

    /* Disable hover effects on touch devices */
    .btn-cta:hover,
    .btn-pricing:hover,
    .btn-submit:hover {
        transform: none;
    }
    
    /* Enhance active/pressed states for touch feedback */
    .btn-cta:active,
    .btn-pricing:active,
    .btn-submit:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
}

/* ============================================================================
   3D Pressed Buttons - Primary & Secondary Variants
   Based on button-26 design, adapted for CYBERCUBE project
   ============================================================================ */

/* Primary 3D Button - Argentinian Blue with Orange Hover */
.btn-primary-3d {
    background: var(--white, #ffffff);
    border: 2px solid var(--white, #ffffff); /* White border */
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 10px;
    outline: none;
    padding: 0;
    box-shadow: 0 2px 10px rgba(66, 165, 245, 0.3), 5px 14px 20px rgba(66, 165, 245, 0.25);
    transition: all 0.15s ease-in-out;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    font-family: inherit;
    display: inline-block;
    text-decoration: none;
}

.btn-primary-3d__content {
    display: block;
    padding: 20px 36px;
    border-radius: 8px;
    background: #42A5F5; /* Argentinian Blue */
    box-shadow: inset 0 -6px #0D85D8, 0 -2px var(--white, #ffffff); /* Blue de France for depth, white highlight */
    transition: all 0.1s ease-in-out;
}

.btn-primary-3d__text {
    color: var(--white, #ffffff);
    display: block;
    transform: translate3d(0, -4px, 0);
    transition: all 0.1s ease-in-out;
    font-weight: 600;
}

.btn-primary-3d:hover {
    border-color: #888888; /* Grey border on hover */
    box-shadow: 0 3px 12px rgba(136, 136, 136, 0.4), 5px 16px 24px rgba(136, 136, 136, 0.35); /* Grey glow */
}

.btn-primary-3d:hover .btn-primary-3d__content {
    box-shadow: inset 0 -7px #0D85D8, 0 -2px var(--white, #ffffff); /* Deeper blue de France shadow */
}

.btn-primary-3d:active {
    box-shadow: none;
    transform: translateY(0);
}

.btn-primary-3d:active .btn-primary-3d__content {
    box-shadow: none;
}

.btn-primary-3d:active .btn-primary-3d__text {
    transform: translate3d(0, 0, 0);
}

.btn-primary-3d:focus {
    outline: 2px solid #888888; /* Grey focus ring */
    outline-offset: 2px;
}

/* Secondary 3D Button */
.btn-secondary-3d {
    background: var(--white, #ffffff);
    border: 2px solid var(--grey-medium, #888888);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 10px;
    outline: none;
    padding: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15), 5px 14px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.1s ease-in-out;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    font-family: inherit;
    display: inline-block;
    text-decoration: none;
}

.btn-secondary-3d__content {
    display: block;
    padding: 20px 36px;
    border-radius: 8px;
    background: var(--white, #ffffff);
    box-shadow: inset 0 -6px #d5d7de, 0 -2px var(--white, #ffffff);
    transition: all 0.1s ease-in-out;
}

.btn-secondary-3d__text {
    color: var(--grey-dark, #333333);
    display: block;
    transform: translate3d(0, -4px, 0);
    transition: all 0.1s ease-in-out;
    font-weight: 600;
}

.btn-secondary-3d:hover {
    border-color: var(--primary-blue, #0D85D8);
    box-shadow: 0 3px 12px rgba(13, 133, 216, 0.2), 5px 16px 24px rgba(13, 133, 216, 0.2);
}

.btn-secondary-3d:hover .btn-secondary-3d__content {
    box-shadow: inset 0 -7px #c5c7ce, 0 -2px var(--white, #ffffff);
}

.btn-secondary-3d:active {
    box-shadow: none;
    transform: translateY(0);
}

.btn-secondary-3d:active .btn-secondary-3d__content {
    box-shadow: none;
}

.btn-secondary-3d:active .btn-secondary-3d__text {
    transform: translate3d(0, 0, 0);
}

.btn-secondary-3d:focus {
    outline: 2px solid var(--primary-blue, #0D85D8);
    outline-offset: 2px;
}

/* Size Variants for 3D Buttons */
.btn-primary-3d.btn-sm .btn-primary-3d__content,
.btn-secondary-3d.btn-sm .btn-secondary-3d__content {
    padding: 14px 24px;
    font-size: 14px;
}

.btn-primary-3d.btn-lg .btn-primary-3d__content,
.btn-secondary-3d.btn-lg .btn-secondary-3d__content {
    padding: 26px 48px;
    font-size: 18px;
}

/* Disabled State for 3D Buttons */
.btn-primary-3d:disabled,
.btn-secondary-3d:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-primary-3d:disabled:hover,
.btn-secondary-3d:disabled:hover {
    transform: none;
    box-shadow: none;
}

.btn-primary-3d:disabled .btn-primary-3d__content,
.btn-secondary-3d:disabled .btn-secondary-3d__content {
    box-shadow: none;
}

.btn-primary-3d:disabled .btn-primary-3d__text,
.btn-secondary-3d:disabled .btn-secondary-3d__text {
    transform: none;
}

/* Responsive adjustments for 3D buttons */
@media (max-width: 768px) {
    .btn-primary-3d__content,
    .btn-secondary-3d__content {
        padding: 16px 28px;
        font-size: 15px;
    }
    
    /* Enhance active/pressed states for touch feedback */
    .btn-primary-3d:active,
    .btn-secondary-3d:active {
        transform: scale(0.98);
        opacity: 0.95;
    }
}

/* ============================================================================
   3D Dropdown Menu Variant
   ============================================================================ */

.btn-dropdown-3d {
    background: var(--white, #ffffff);
    border: 2px solid var(--white, #ffffff); /* White border like primary */
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 10px;
    outline: none;
    padding: 0;
    box-shadow: 0 2px 10px rgba(66, 165, 245, 0.3), 5px 14px 20px rgba(66, 165, 245, 0.25); /* Blue glow like primary */
    transition: all 0.15s ease-in-out;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    font-family: inherit;
    display: inline-block;
    position: relative;
    min-width: 320px; /* Fixed width to prevent resizing */
}

.btn-dropdown-3d__content {
    padding: 14px 40px 14px 24px;
    border-radius: 8px;
    background: #42A5F5; /* Argentinian Blue like primary */
    box-shadow: inset 0 -6px #0D85D8, 0 -2px var(--white, #ffffff); /* Blue de France depth */
    transition: all 0.1s ease-in-out;
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-dropdown-3d__text {
    color: var(--white, #ffffff); /* White text like primary */
    display: block;
    transform: translate3d(0, -4px, 0);
    transition: all 0.1s ease-in-out;
    font-weight: 600;
}

.btn-dropdown-3d__icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translate3d(0, calc(-50% - 4px), 0);
    transition: all 0.2s ease-in-out;
    color: var(--white, #ffffff); /* White icon to match text */
    pointer-events: none;
}

.btn-dropdown-3d__icon svg {
    width: 16px;
    height: 16px;
    display: block;
}

.btn-dropdown-3d:hover {
    border-color: #888888; /* Grey border on hover like primary */
    box-shadow: 0 3px 12px rgba(136, 136, 136, 0.4), 5px 16px 24px rgba(136, 136, 136, 0.35); /* Grey glow like primary */
}

.btn-dropdown-3d:hover .btn-dropdown-3d__content {
    box-shadow: inset 0 -7px #0D85D8, 0 -2px var(--white, #ffffff); /* Deeper blue shadow */
}

.btn-dropdown-3d:active {
    box-shadow: none;
}

.btn-dropdown-3d:active .btn-dropdown-3d__content {
    box-shadow: none;
}

.btn-dropdown-3d:active .btn-dropdown-3d__text,
.btn-dropdown-3d:active .btn-dropdown-3d__icon {
    transform: translate3d(0, 0, 0);
}

.btn-dropdown-3d.open .btn-dropdown-3d__icon {
    transform: translate3d(0, calc(-50% - 4px), 0) rotate(180deg);
}

.btn-dropdown-3d:focus {
    outline: 2px solid #888888; /* Grey focus ring like primary */
    outline-offset: 2px;
}

/* Dropdown Menu Container */
.dropdown-3d {
    position: relative;
    display: inline-block;
}

.dropdown-3d__menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 100%;
    background: var(--white, #ffffff);
    border: 2px solid var(--grey-light, #D1D5DB);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), 0 8px 30px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease-in-out;
    z-index: 1000;
    overflow: hidden;
}

.dropdown-3d.open .dropdown-3d__menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-3d__item {
    padding: 12px 20px;
    color: var(--grey-dark, #333333);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    border-bottom: 1px solid var(--grey-lightest, #F3F4F6);
    background: var(--white, #ffffff);
}

.dropdown-3d__item:last-child {
    border-bottom: none;
}

.dropdown-3d__item:hover {
    background: var(--grey-lightest, #F8F9FA);
    color: var(--primary-blue, #0D85D8);
    padding-left: 24px;
}

.dropdown-3d__item:active {
    background: var(--primary-blue-light, rgba(13, 133, 216, 0.1));
}

.dropdown-3d__item-icon {
    color: #000000; /* Black icons in dropdown menu only */
    transition: color 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.dropdown-3d__item-icon img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    /* Dark SVG icons stay black - no hover color change */
}

.dropdown-3d__divider {
    height: 1px;
    background: var(--grey-lighter, #E8EDF2);
    margin: 4px 0;
}

/* Disabled dropdown items */
.dropdown-3d__item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Responsive adjustments for dropdown */
@media (max-width: 768px) {
    .btn-dropdown-3d__content {
        padding: 12px 36px 12px 20px;
        font-size: 14px;
    }
    
    .dropdown-3d__menu {
        min-width: 200px;
    }
    
    .dropdown-3d__item {
        padding: 14px 18px;
        font-size: 14px;
    }
    
    .dropdown-3d__item:hover {
        padding-left: 18px;
    }
}

