/**
 * AI Grooming Estimator - Card-Based UI Styles
 */

/* Container */
.grooming-estimator-container {
    max-width: 600px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Header */
.ge-header {
    text-align: center;
    margin-bottom: 20px;
}

.ge-header h2 {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 6px 0;
}

.ge-header p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* Form Container */
.ge-form-container {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Form Elements */
.ge-form-section {
    margin-bottom: 18px;
}

.ge-form-section:last-child {
    margin-bottom: 0;
}

.ge-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.ge-optional {
    font-size: 12px;
    font-weight: 400;
    color: #999;
}

/* Row Layout */
.ge-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 18px;
}

/* Text Input */
.ge-input {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 2px solid #e5e5e5;
    border-radius: 7px;
    background: #fff;
    color: #1a1a1a;
    transition: border-color 0.2s;
}

.ge-input:hover {
    border-color: #d1d1d1;
}

.ge-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Textarea */
.ge-textarea {
    width: 100%;
    padding: 11px 14px;
    font-size: 14px;
    font-family: inherit;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    resize: vertical;
    transition: border-color 0.2s;
}

.ge-textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Photo Upload */
.ge-photo-upload-area {
    position: relative;
    border: 2px dashed #d1d1d1;
    border-radius: 8px;
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #fafafa;
}

.ge-photo-upload-area:hover {
    border-color: #007bff;
    background: #f0f7ff;
}

.ge-photo-upload-area.ge-dragover {
    border-color: #007bff;
    background: #e6f2ff;
}

.ge-file-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.ge-upload-prompt {
    color: #666;
}

.ge-upload-prompt svg {
    color: #007bff;
    margin-bottom: 10px;
}

.ge-upload-prompt p {
    margin: 6px 0 0 0;
}

.ge-file-hint {
    font-size: 13px;
    color: #999;
}

.ge-photo-preview {
    position: relative;
}

.ge-photo-preview img {
    max-width: 100%;
    max-height: 250px;
    border-radius: 8px;
}

.ge-remove-photo {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}

.ge-remove-photo:hover {
    background: rgba(0, 0, 0, 0.9);
}

/* Options Grid - Card-based Selection */
.ge-options-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.ge-matting-grid {
    grid-template-columns: repeat(5, 1fr);
}

.ge-option-card {
    cursor: pointer;
    display: block;
}

.ge-option-card input[type="radio"] {
    display: none;
}

.ge-card-content {
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    padding: 14px 10px;
    text-align: center;
    transition: all 0.2s;
    background: #fff;
    height: 100%;
}

.ge-option-card:hover .ge-card-content {
    border-color: #b3d9f2;
    background: #f0f7ff;
    transform: translateY(-1px);
}

.ge-option-card input:checked+.ge-card-content {
    border-color: #007bff;
    background: #e6f2ff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
}

.ge-card-emoji {
    font-size: 28px;
    margin-bottom: 6px;
}

.ge-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 3px;
}

.ge-card-desc {
    font-size: 12px;
    color: #666;
    line-height: 1.3;
}

.ge-fee {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #ff6b00;
    margin-top: 2px;
}

/* Service Selection Cards */
.ge-service-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.ge-service-card {
    cursor: pointer;
    display: block;
}

.ge-service-card input[type="radio"] {
    display: none;
}

.ge-service-content {
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    padding: 14px 10px;
    text-align: center;
    transition: all 0.2s;
    background: #fff;
    height: 100%;
}

.ge-service-card:hover .ge-service-content {
    border-color: #b3d9f2;
    background: #f0f7ff;
    transform: translateY(-1px);
}

.ge-service-card input:checked+.ge-service-content {
    border-color: #007bff;
    background: #e6f2ff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
}

.ge-service-icon {
    font-size: 28px;
    margin-bottom: 6px;
}

.ge-service-name {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 3px;
}

.ge-service-desc {
    font-size: 12px;
    color: #666;
}

/* Discount Shave Banner */
.ge-discount-shave {
    margin-bottom: 24px;
}

.ge-discount-banner {
    background: linear-gradient(135deg, #fff9e6 0%, #ffedd5 100%);
    border: 2px solid #ffb84d;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.ge-discount-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.ge-discount-content {
    flex: 1;
}

.ge-discount-content strong {
    display: block;
    font-size: 15px;
    color: #9933;
    margin-bottom: 4px;
}

.ge-discount-content p {
    font-size: 13px;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

.ge-discount-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    flex-shrink: 0;
}

.ge-discount-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.ge-discount-checkbox span {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

/* Compact Add-ons */
.ge-addons-compact {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.ge-addon-compact {
    cursor: pointer;
    display: block;
}

.ge-addon-compact input[type="checkbox"] {
    display: none;
}

.ge-addon-content {
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
    background: #fff;
}

.ge-addon-compact:hover .ge-addon-content {
    border-color: #b3d9f2;
    background: #f0f7ff;
}

.ge-addon-compact input:checked+.ge-addon-content {
    border-color: #007bff;
    background: #e6f2ff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
}

.ge-addon-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.ge-addon-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
}

.ge-addon-price {
    font-size: 14px;
    font-weight: 700;
    color: #007bff;
    flex-shrink: 0;
}

/* Start Button Section */
.ge-start-section {
    text-align: center;
    padding: 40px 20px;
}

.ge-start-btn {
    display: inline-block;
    padding: 18px 48px;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.ge-start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.ge-start-btn:active {
    transform: translateY(0);
}

/* Submit Button */
.ge-submit-btn {
    width: 100%;
    padding: 15px 32px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 28px;
}

.ge-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 123, 255, 0.3);
}

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

.ge-btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ge-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Results Section */
.ge-results-container {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.ge-results-header {
    text-align: center;
    margin-bottom: 20px;
}

.ge-results-header h3 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.ge-info-card {
    background: #f8f9fa;
    border-radius: 7px;
    padding: 14px;
    margin-bottom: 16px;
}

.ge-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 0;
}

.ge-info-row:not(:last-child) {
    border-bottom: 1px solid #e5e5e5;
}

.ge-info-label {
    font-size: 14px;
    font-weight: 500;
    color: #666;
}

.ge-info-value {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
}

/* Selections Card */
.ge-selections-card {
    background: #e8f4fd;
    border: 1px solid #b3d9f2;
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 20px;
}

.ge-selections-card h4 {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 14px 0;
}

.ge-selection-item {
    display: flex;
    justify-content: space-between;
    padding: 7px 0;
    font-size: 14px;
    color: #333;
}

.ge-selection-item strong {
    color: #007bff;
}

/* Price Breakdown */
.ge-price-breakdown {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 20px;
}

.ge-price-breakdown h4 {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 14px 0;
}

.ge-breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.ge-breakdown-item:last-child {
    border-bottom: none;
}

.ge-breakdown-item span:last-child {
    font-weight: 600;
    color: #1a1a1a;
}

/* Upsell Section */
.ge-upsell-section {
    background: #fff9f0;
    border: 1px solid #ffead1;
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 20px;
}

.ge-upsell-section h4 {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 6px 0;
}

.ge-upsell-intro {
    font-size: 13px;
    color: #666;
    margin: 0 0 14px 0;
}

.ge-upsell-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    margin-bottom: 10px;
}

.ge-upsell-item:last-child {
    margin-bottom: 0;
}

.ge-upsell-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.ge-upsell-info {
    flex: 1;
}

.ge-upsell-info strong {
    display: block;
    font-size: 14px;
    color: #1a1a1a;
    margin-bottom: 2px;
}

.ge-upsell-info p {
    font-size: 12px;
    color: #666;
    margin: 0;
}

.ge-upsell-price {
    font-size: 15px;
    font-weight: 700;
    color: #ff9500;
    flex-shrink: 0;
}

/* Price Range */
.ge-price-range {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: #fff;
    border-radius: 8px;
    padding: 22px;
    text-align: center;
    margin-bottom: 20px;
}

.ge-price-label {
    font-size: 13px;
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: 6px;
}

.ge-price-amount {
    font-size: 34px;
    font-weight: 700;
    margin-bottom: 10px;
}

.ge-price-note {
    font-size: 12px;
    opacity: 0.8;
    margin: 0;
}

/* CTA Buttons */
.ge-cta-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.ge-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
}

.ge-cta-primary {
    background: #28a745;
    color: #fff;
}

.ge-cta-primary:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.3);
}

.ge-cta-secondary {
    background: #6c757d;
    color: #fff;
}

.ge-cta-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(108, 117, 125, 0.3);
}

/* New Estimate Button */
.ge-new-estimate-btn {
    display: inline-block;
    padding: 11px 22px;
    font-size: 14px;
    font-weight: 500;
    color: #007bff;
    background: #fff;
    border: 2px solid #007bff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.ge-new-estimate-btn:hover {
    background: #007bff;
    color: #fff;
}

/* Error Message */
.ge-error-message {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 14px;
    margin-top: 16px;
}

.ge-error-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ge-error-icon {
    font-size: 22px;
}

.ge-error-content p {
    margin: 0;
    color: #856404;
    font-size: 14px;
}

/* Rate Limit Info */
.ge-rate-limit-info {
    text-align: center;
    font-size: 12px;
    color: #666;
    margin-top: 14px;
}

/* Responsive */
@media (max-width: 640px) {
    .grooming-estimator-container {
        margin: 20px;
    }

    .ge-form-container,
    .ge-results-container {
        padding: 20px;
    }

    .ge-header h2 {
        font-size: 26px;
    }

    .ge-row {
        grid-template-columns: 1fr;
    }

    .ge-options-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ge-matting-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ge-addons-compact {
        grid-template-columns: 1fr;
    }

    .ge-price-amount {
        font-size: 28px;
    }

    .ge-cta-section {
        grid-template-columns: 1fr;
    }
}