/**
 * Gift Purchase Page Styles
 *
 * Standalone styling for the gift token purchase flow.
 * Uses similar design language to the main Scribbin site.
 */

/* Page Layout */
.gift-purchase-page {
    min-height: 100vh;
    background: linear-gradient(180deg, #f9fafb 0%, #f3f4f6 100%);
    display: flex;
    flex-direction: column;
}

/* Navigation */
.gift-nav {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.gift-nav .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gift-nav .logo-image {
    height: 40px;
}

.gift-nav .nav-links {
    display: flex;
    gap: 0.75rem;
}

.gift-nav .btn-outline {
    background: transparent;
    border: 1px solid #e5e7eb;
    color: #4b5563;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.gift-nav .btn-outline:hover {
    border-color: #667eea;
    color: #667eea;
}

/* Main Container */
.gift-container {
    flex: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
    width: 100%;
}

/* Hero Section */
.gift-hero {
    text-align: center;
    margin-bottom: 2.5rem;
}

.gift-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gift-hero p {
    font-size: 1.125rem;
    color: #6b7280;
    margin: 0;
}

/* Alert Messages */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.alert-warning {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    color: #92400e;
}

/* Form Sections */
.gift-section {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.section-number {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.section-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

/* Package Selection Grid - 2x2 layout with descriptive cards */
.package-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (max-width: 500px) {
    .package-grid {
        grid-template-columns: 1fr;
    }
}

.package-card {
    position: relative;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
}

.package-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.package-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.package-card:has(input:checked) {
    border-color: #667eea;
    background: linear-gradient(135deg, #f5f3ff 0%, #faf5ff 100%);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

/* Popular badge */
.package-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

/* Featured card gets extra top padding for badge */
.package-card.featured {
    padding-top: 1.75rem;
}

/* Package header - name and price on same row */
.package-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.package-name {
    font-size: 1rem;
    font-weight: 700;
    color: #1f2937;
}

.package-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: #667eea;
}

/* Token count row */
.package-tokens-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.package-tokens {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1;
}

.package-label {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Description text */
.package-description {
    font-size: 0.8125rem;
    color: #6b7280;
    line-height: 1.5;
    margin: 0;
    flex: 1;
}

/* Form Groups */
.form-group {
    margin-bottom: 1rem;
}

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

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.field-hint {
    display: block;
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.375rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 500px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Checkbox styling */
.checkbox-group {
    margin-top: 0.75rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.checkbox-text {
    font-size: 0.875rem;
    color: #4b5563;
}

/* Delivery Options */
.delivery-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.delivery-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.delivery-option:hover {
    border-color: #667eea;
    background: #f9fafb;
}

.delivery-option:has(input:checked) {
    border-color: #667eea;
    background: #f5f3ff;
}

.delivery-option input {
    margin-top: 4px;
    accent-color: #667eea;
}

.option-content {
    flex: 1;
}

.option-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.option-icon {
    font-size: 1.25rem;
}

.option-title {
    font-weight: 600;
    color: #1f2937;
    flex: 1;
}

.option-price {
    font-size: 0.875rem;
    font-weight: 600;
    color: #059669;
}

.option-desc {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Conditional Fields */
.conditional-fields {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e5e7eb;
}

.schedule-fields {
    margin-top: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
}

/* Address Notice */
.address-notice {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.notice-icon {
    font-size: 1.25rem;
}

.postcode-group {
    max-width: 200px;
}

.postcode-input {
    text-transform: uppercase;
}

/* Order Summary */
.gift-summary {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.gift-summary h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 1rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    font-size: 0.9375rem;
    color: #4b5563;
}

.summary-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 0.5rem 0;
}

.summary-total {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
}

/* Form Errors */
.form-errors {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.form-errors ul {
    margin: 0;
    padding-left: 1.25rem;
    color: #dc2626;
}

.form-errors li {
    margin-bottom: 0.25rem;
}

.form-errors li:last-child {
    margin-bottom: 0;
}

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

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

.secure-notice {
    text-align: center;
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 1rem;
}

.lock-icon {
    margin-right: 0.25rem;
}

/* Responsive Adjustments */
@media (max-width: 640px) {
    .gift-hero h1 {
        font-size: 1.875rem;
    }

    .gift-hero p {
        font-size: 1rem;
    }

    .gift-section {
        padding: 1.25rem;
    }

    .section-header h2 {
        font-size: 1.125rem;
    }
}
