/**
 * Dimension Connect Forms CSS - BEAUTIFUL GLASS MORPHISM EDITION
 * Uses theme coloring with teal glass morphism effects
 * Everything is customizable and editable
 */

/* CSS Custom Properties for Dynamic Styling */
:root {
    --dimension-primary-color: #00ffc3;
    --dimension-text-color: #ffffff;
    --dimension-background-color: rgba(255, 255, 255, 0.05);
    --dimension-border-color: rgba(255, 255, 255, 0.1);
    --dimension-button-bg: linear-gradient(135deg, var(--dimension-primary-color), rgba(var(--dimension-primary-color), 0.8));
    --dimension-button-text: #000000;
}

/* Dynamic color classes for block customization */
.dimension-form-container[data-text-color] {
    --dimension-text-color: var(--custom-text-color, #ffffff);
}

.dimension-form-container[data-primary-color] {
    --dimension-primary-color: var(--custom-primary-color, #00ffc3);
}

.dimension-form-container[data-background-color] {
    --dimension-background-color: var(--custom-background-color, rgba(255, 255, 255, 0.05));
}

.dimension-form-container[data-button-bg] {
    --dimension-button-bg: var(--custom-button-bg, linear-gradient(135deg, var(--dimension-primary-color), rgba(var(--dimension-primary-color), 0.8)));
}

.dimension-form-container[data-button-text] {
    --dimension-button-text: var(--custom-button-text, #000000);
}

/* Import custom fonts */
@font-face {
    font-family: 'Runaways';
    src: url('../assets/fonts/Runaways-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Space Mono';
    src: url('../assets/fonts/SpaceMono-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ====================
   GLASS MORPHISM FORM CONTAINERS
   ==================== */

.dimension-form-container {
    width: 100%;
    max-width: 420px;
    margin: 2rem auto;
    padding: 1.5rem;
    position: relative;
}

.dimension-form {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.dimension-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.dimension-form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.dimension-form-title {
    font-family: 'Runaways', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, currentColor, rgba(255, 255, 255, 0.8));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dimension-form-header p {
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    opacity: 0.8;
    margin: 0;
}

/* ====================
   GLASS MORPHISM FORM FIELDS
   ==================== */

.dimension-form-field {
    margin-bottom: 1.5rem;
    position: relative;
}

.dimension-form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-family: 'Space Mono', monospace;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

/* Glass Morphism Input Styling */
.dimension-form-input,
.dimension-form input[type="text"],
.dimension-form input[type="email"],
.dimension-form input[type="password"],
.dimension-form input[type="tel"],
.dimension-form select,
.dimension-form textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    color: var(--dimension-primary-color, #00ffc3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    position: relative;
}

.dimension-form-input:focus,
.dimension-form input[type="text"]:focus,
.dimension-form input[type="email"]:focus,
.dimension-form input[type="password"]:focus,
.dimension-form input[type="tel"]:focus,
.dimension-form select:focus,
.dimension-form textarea:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--dimension-primary-color, rgba(0, 255, 195, 0.4));
    color: var(--dimension-text-color, white);
    box-shadow: 
        0 0 0 3px var(--dimension-primary-color, rgba(0, 255, 195, 0.15)),
        0 8px 25px var(--dimension-primary-color, rgba(0, 255, 195, 0.1));
    transform: translateY(-1px);
}

.dimension-form-input::placeholder,
.dimension-form input::placeholder {
    color: var(--dimension-primary-color, rgba(0, 255, 195, 0.6));
}

/* ====================
   GLASS MORPHISM BUTTONS
   ==================== */

.dimension-form-button,
.dimension-btn {
    width: 100%;
    padding: 14px 24px;
    background: rgba(0, 255, 195, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid rgba(0, 255, 195, 0.4);
    border-radius: 12px;
    color: #00ffc3;
    font-family: 'Space Mono', monospace;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 8px 32px rgba(0, 255, 195, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.dimension-form-button:hover,
.dimension-btn:hover {
    background: rgba(0, 255, 195, 0.15);
    border-color: rgba(0, 255, 195, 0.6);
    color: white;
    transform: translateY(-2px);
    box-shadow: 
        0 12px 40px rgba(0, 255, 195, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.dimension-form-button:active,
.dimension-btn:active {
    transform: translateY(-1px);
    box-shadow: 
        0 8px 25px rgba(0, 255, 195, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Loading state */
.dimension-form-button:disabled,
.dimension-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.dimension-loading {
    position: relative;
    color: transparent !important;
}

.dimension-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ====================
   GLASS MORPHISM CHECKBOXES
   ==================== */

.dimension-checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1rem 0;
}

.dimension-checkbox-input {
    width: auto !important;
    height: 18px;
    accent-color: #00ffc3;
}

.dimension-checkbox-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
    cursor: pointer;
}

/* ====================
   GLASS MORPHISM MESSAGES
   ==================== */

.dimension-form-message,
.dimension-message {
    padding: 1rem;
    border-radius: 12px;
    margin: 1rem 0;
    font-family: 'Space Mono', monospace;
    font-weight: 500;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid;
    display: none;
}

.dimension-message.success {
    background: rgba(40, 167, 69, 0.1);
    border-color: rgba(40, 167, 69, 0.3);
    color: #28a745;
}

.dimension-message.error {
    background: rgba(220, 53, 69, 0.1);
    border-color: rgba(220, 53, 69, 0.3);
    color: #dc3545;
}

.dimension-message.warning {
    background: rgba(255, 193, 7, 0.1);
    border-color: rgba(255, 193, 7, 0.3);
    color: #ffc107;
}

/* ====================
   FORM LAYOUT HELPERS
   ==================== */

.dimension-form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.dimension-form-half {
    flex: 1;
}

.dimension-form-center {
    text-align: center;
}

.dimension-form-link {
    color: #00ffc3;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.dimension-form-link:hover {
    color: white;
    text-decoration: underline;
}

.dimension-form p {
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    margin: 1rem 0;
    text-align: center;
    opacity: 0.8;
}

/* ====================
   RESPONSIVE DESIGN
   ==================== */

@media (max-width: 768px) {
    .dimension-form-container {
        margin: 1rem;
        padding: 1rem;
        max-width: none;
    }
    
    .dimension-form {
        padding: 1.5rem;
    }
    
    .dimension-form-title {
        font-size: 1.5rem;
    }
    
    .dimension-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .dimension-form-half {
        margin-bottom: 1.5rem;
    }
    
    /* Hide Kadence TICKETS button on mobile devices */
    .kb-button:has-text("TICKETS"),
    .kadence-button:has-text("TICKETS"),
    .wp-block-button__link:has-text("TICKETS"),
    [href*="tickets"],
    [href*="support"],
    button:contains("TICKETS"),
    a:contains("TICKETS"),
    .kb-button[href*="support"],
    .kadence-button[href*="support"] {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .dimension-form {
        padding: 1.25rem;
    }
    
    .dimension-form-button,
    .dimension-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* ====================
   ANIMATIONS
   ==================== */

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dimension-form-container {
    animation: fadeInUp 0.6s ease-out;
}

/* ====================
   CUSTOM PAGE CONTAINERS (LEGACY SUPPORT)
   ==================== */

.dimension-custom-page {
    min-height: 80vh;
    padding: 2rem 1rem;
    font-family: 'Space Mono', monospace;
}

.dimension-custom-page .container {
    max-width: 500px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.dimension-custom-page h1 {
    font-family: 'Runaways', sans-serif;
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, currentColor, rgba(255, 255, 255, 0.8));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
