/* Modern Reset & Font - DARK MODE */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&display=swap');

:root {
    --clto-primary: #74b9ff;
    --clto-secondary: #0984e3;
    --clto-bg: #1e272e;
    --clto-text: #dfe6e9;
    --clto-input-bg: #2d3436;
    --clto-border: rgba(255, 255, 255, 0.05);
}

#clto-wrapper * {
    box-sizing: border-box;
}

#clto-wrapper {
    max-width: 1050px;
    margin: 30px auto;
    background: var(--clto-bg);
    /* Dark Base */
    padding: 0;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    /* Darker shadow for depth */
    font-family: 'Cairo', sans-serif;
    color: var(--clto-text);
    /* Light Text */
    overflow: hidden;
    border: 1px solid var(--clto-border);
    /* Subtle border for definition */
}

/* Header */
.clto-header {
    text-align: center;
    background: linear-gradient(135deg, #2d3436 0%, var(--clto-bg) 100%);
    padding: 15px;
    border-bottom: 1px solid var(--clto-border);
}

.clto-header h2 {
    font-size: 24px;
    margin: 0 0 5px;
    color: #ffffff;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.clto-header p {
    color: #b2bec3;
    font-size: 16px;
    margin: 0;
    font-weight: 400;
}

/* Form Container */
#clto-order-form {
    padding: 15px;
}

.clto-section {
    margin-bottom: 15px;
    position: relative;
}

/* Section Labels */
.clto-section label {
    display: block;
    margin-bottom: 10px;
    font-size: 15px;
    font-weight: 700;
    color: var(--clto-text);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.clto-section label .dashicons {
    color: var(--clto-primary);
    /* Brighter Blue for Dark Mode */
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Grid Layout */
.clto-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Inputs & Selects */
.clto-select-wrapper {
    position: relative;
}

#clto-wrapper input[type="text"],
#clto-wrapper input[type="email"],
#clto-wrapper input[type="number"],
.clto-select-wrapper select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #2d3436;
    border-radius: 8px;
    font-size: 15px;
    background-color: var(--clto-input-bg);
    /* Dark Input Bg */
    color: #ffffff;
    transition: all 0.3s ease;
    height: auto;
    font-family: inherit;
}

/* Focus States */
#clto-wrapper input:focus,
.clto-select-wrapper select:focus {
    border-color: var(--clto-secondary);
    background-color: #353b48;
    /* Slightly lighter on focus */
    box-shadow: 0 0 0 4px rgba(9, 132, 227, 0.2);
    outline: none;
    transform: translateY(-1px);
}

/* Custom Select Arrow - REMOVED to fix double arrow issues */
.clto-select-wrapper select {
    appearance: auto;
    -webkit-appearance: auto;
    -moz-appearance: auto;
    cursor: pointer;
    background-image: none !important;
    /* Ensure no background image arrow */
}

/* Fix IE specific if needed */
.clto-select-wrapper select::-ms-expand {
    display: block;
    /* Restore default for consistency */
}

/* Style Options for Visibility */
.clto-select-wrapper select option {
    background-color: #2d3436 !important;
    color: #ffffff !important;
    padding: 10px;
}

.clto-select-wrapper::after {
    display: none !important;
}

/* RTL Specifics - revert padding since custom arrow is gone */
html[dir="rtl"] .clto-select-wrapper select {
    padding-right: 15px !important;
    padding-left: 15px !important;
}

/* File Upload Area */
.clto-upload-area {
    border: 2px dashed #636e72;
    border-radius: 12px;
    padding: 10px;
    text-align: center;
    transition: all 0.3s ease;
    background: var(--clto-input-bg);
    cursor: pointer;
    position: relative;
}

.clto-upload-area:hover,
.clto-upload-area.drag-over {
    border-color: var(--clto-primary);
    background: #353b48;
    transform: scale(1.01);
}

.clto-upload-placeholder .dashicons {
    font-size: 40px;
    width: 40px;
    height: 40px;
    color: var(--clto-primary);
    margin-bottom: 10px;
    transition: transform 0.3s;
}

.clto-upload-area:hover .dashicons {
    transform: translateY(-3px);
}

.clto-upload-placeholder p {
    font-size: 16px;
    color: #ffffff;
    margin: 0;
}

/* General Small Text Fix */
#clto-order-form small,
.clto-upload-placeholder small {
    display: block;
    margin-top: 5px;
    color: #b2bec3;
    font-size: 12px !important;
    /* Force small size */
    line-height: normal;
    font-weight: normal;
}

/* Hidden File Input */
#clto-file-upload {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Loader */
.clto-spinner {
    border: 4px solid rgba(116, 185, 255, 0.1);
    border-top: 4px solid var(--clto-primary);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    animation: spin 1s infinite linear;
    margin: 0 auto 12px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Calculate Button */
button#clto-calc-btn {
    width: 100%;
    padding: 12px;
    background: var(--clto-input-bg);
    color: var(--clto-text);
    border: 1px solid #636e72;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 15px;
}

button#clto-calc-btn:hover {
    background: #353b48;
    border-color: var(--clto-primary);
    color: var(--clto-primary);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

/* Plans Grid */
.clto-plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    /* More gap */
    margin: 5px 0;
    opacity: 0;
    animation: fadeIn 0.5s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Plan Card */
.clto-plan-card {
    border: 2px solid var(--clto-input-bg);
    border-radius: 12px;
    padding: 15px 10px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    background: var(--clto-input-bg);
    position: relative;
    display: flex;
    flex-direction: column;
}

.clto-plan-card:hover {
    border-color: #636e72;
    background: #353b48;
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.clto-plan-card.clto-active {
    border-color: var(--clto-secondary);
    background: #353b48;
    box-shadow: 0 10px 40px rgba(9, 132, 227, 0.1);
    transform: translateY(-5px);
}

/* Internal Checkmark for active state */
.clto-plan-card.clto-active::before {
    content: '\f147';
    font-family: 'dashicons';
    position: absolute;
    top: 15px;
    left: 15px;
    color: var(--clto-primary);
    font-size: 24px;
}

html[dir="rtl"] .clto-plan-card.clto-active::before {
    left: auto;
    right: 15px;
}

.clto-plan-title {
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 8px;
    text-transform: uppercase;
    text-align: center;
}

.clto-plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--clto-secondary);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(9, 132, 227, 0.2);
}

.clto-plan-desc {
    font-size: 13px;
    color: #b2bec3;
    margin-bottom: 20px;
    text-align: center;
    line-height: 1.5;
}

.clto-plan-price {
    font-size: 32px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 5px;
    text-align: center;
}

.clto-plan-meta {
    font-size: 12px;
    color: #636e72;
    margin-bottom: 20px;
    text-align: center;
}

.clto-plan-delivery {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid var(--clto-border);
    font-size: 13px;
    color: #55efc4;
    /* Bright Green */
    font-weight: 700;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.clto-plan-delivery::before {
    content: '\f469';
    font-family: 'dashicons';
}

/* User Details */
.clto-client-details h3 {
    margin: 0 0 20px;
    font-size: 18px;
    color: #ffffff;
    border-bottom: 2px solid var(--clto-border);
    padding-bottom: 10px;
    display: inline-block;
}

/* Submit Button */
button#clto-submit-btn {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, var(--clto-secondary) 0%, #00cec9 100%);
    color: #ffffff;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(9, 132, 227, 0.1);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

button#clto-submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(9, 132, 227, 0.2);
}

button#clto-submit-btn:disabled {
    background: #636e72;
    transform: none;
    box-shadow: none;
    cursor: not-allowed;
}

/* Messages */
.clto-error-message,
.clto-success-message {
    padding: 18px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.clto-error-message {
    background: linear-gradient(135deg, #d63031 0%, #e74c3c 100%);
    color: #ffffff;
    border: 2px solid #ff7675;
}

/* Mobile */
@media (max-width: 768px) {
    .clto-plans-grid {
        grid-template-columns: 1fr;
    }

    .clto-grid-2 {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    #clto-wrapper {
        margin: 5px;
        padding: 0;
    }

    #clto-order-form {
        padding: 15px;
    }
}