/**
 * Carla Custom Orders - Frontend Styles
 */

/* Variables */
:root {
    --cco-pink-300: #f9a8d4;
    --cco-pink-500: #ec4899;
    --cco-pink-600: #db2777;
    --cco-purple-500: #8b5cf6;
    --cco-purple-600: #9333ea;
    --cco-gradient: linear-gradient(to right, #db2777, #9333ea);
    --cco-gradient-text: linear-gradient(to right, #f9a8d4, #fecdd3, #d8b4fe);
    --cco-glass-bg: rgba(255, 255, 255, 0.1);
    --cco-glass-border: rgba(255, 255, 255, 0.2);
    --cco-text-light: #f3f4f6;
    --cco-text-gray: #d1d5db;
    --cco-text-muted: #9ca3af;
}

/* Buttons */
.cco-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    font-family: inherit;
}

.cco-btn-primary {
    background: var(--cco-gradient);
    color: white;
}

.cco-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(219, 39, 119, 0.3);
    color: white;
}

.cco-btn-outline {
    background: transparent;
    border: 2px solid var(--cco-glass-border);
    color: var(--cco-text-light);
}

.cco-btn-outline:hover {
    background: var(--cco-glass-bg);
    border-color: var(--cco-pink-300);
    color: var(--cco-pink-300);
}

.cco-btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.cco-btn-block {
    width: 100%;
}

.cco-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Forms */
.cco-form {
    max-width: 100%;
}

.cco-form-section {
    background: var(--cco-glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--cco-glass-border);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.cco-form-section h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: white;
}

.cco-form-group {
    margin-bottom: 1rem;
}

.cco-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--cco-text-light);
}

.cco-form-group input,
.cco-form-group textarea,
.cco-form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--cco-glass-bg);
    border: 1px solid var(--cco-glass-border);
    border-radius: 0.5rem;
    color: var(--cco-text-light);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.cco-form-group input:focus,
.cco-form-group textarea:focus,
.cco-form-group select:focus {
    outline: none;
    border-color: var(--cco-pink-300);
}

.cco-form-group input::placeholder,
.cco-form-group textarea::placeholder {
    color: var(--cco-text-muted);
}

.cco-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 600px) {
    .cco-form-row {
        grid-template-columns: 1fr;
    }
}

.cco-form-actions {
    margin-top: 1.5rem;
}

.cco-form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 0.5rem;
}

.cco-form-message.success {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid #10b981;
    color: #10b981;
}

.cco-form-message.error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid #ef4444;
    color: #ef4444;
}

/* File Upload */
.cco-file-upload {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.cco-file-upload input[type="file"] {
    display: none;
}

.cco-file-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--cco-glass-bg);
    border: 1px solid var(--cco-glass-border);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cco-file-label:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--cco-pink-300);
}

.cco-file-count {
    color: var(--cco-text-muted);
    font-size: 0.875rem;
}

.cco-image-preview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
}

.cco-image-preview img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 0.5rem;
}

.cco-image-preview .cco-preview-item {
    position: relative;
}

.cco-image-preview .cco-remove-image {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cco-preview-item:hover .cco-remove-image {
    opacity: 1;
}

/* Sizing Info Box */
.cco-sizing-info {
    background: rgba(236, 72, 153, 0.1);
    border: 1px solid rgba(236, 72, 153, 0.3);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.cco-sizing-info h4 {
    color: var(--cco-pink-300);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.cco-sizing-info p {
    color: var(--cco-text-gray);
    font-size: 0.875rem;
    margin: 0;
}

/* Order Form Header */
.cco-form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.cco-form-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cco-form-header p {
    color: var(--cco-text-gray);
    max-width: 600px;
    margin: 0 auto;
}

.cco-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--cco-glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--cco-glass-border);
    border-radius: 9999px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--cco-text-gray);
}

.cco-badge .dashicons {
    color: var(--cco-pink-300);
}

/* My Orders */
.cco-my-orders {
    max-width: 900px;
    margin: 0 auto;
}

.cco-page-header {
    margin-bottom: 2rem;
}

.cco-page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.cco-page-header p {
    color: var(--cco-text-gray);
}

.cco-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--cco-glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--cco-glass-border);
    border-radius: 1rem;
}

.cco-empty-state .dashicons {
    font-size: 4rem;
    width: 4rem;
    height: 4rem;
    color: var(--cco-text-muted);
    margin-bottom: 1rem;
}

.cco-empty-state h3 {
    margin-bottom: 0.5rem;
}

.cco-empty-state p {
    color: var(--cco-text-gray);
    margin-bottom: 1.5rem;
}

/* Order Cards */
.cco-orders-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cco-order-card {
    background: var(--cco-glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--cco-glass-border);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.cco-order-card:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.cco-order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cco-order-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.cco-order-info h3 {
    margin: 0;
    font-size: 1.25rem;
}

.cco-order-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--cco-text-muted);
    font-size: 0.875rem;
}

.cco-price {
    color: var(--cco-pink-300);
    font-weight: 600;
}

.cco-order-description {
    color: var(--cco-text-gray);
    margin-bottom: 1rem;
}

.cco-order-images {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.cco-order-images img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 0.5rem;
}

.cco-more-images {
    width: 60px;
    height: 60px;
    background: var(--cco-glass-bg);
    border: 1px solid var(--cco-glass-border);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    color: var(--cco-text-muted);
}

.cco-order-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Status Badges */
.cco-status {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.cco-status-pending_quote {
    background: rgba(234, 179, 8, 0.2);
    color: #fbbf24;
}

.cco-status-quote_sent {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.cco-status-payment_pending {
    background: rgba(249, 115, 22, 0.2);
    color: #fb923c;
}

.cco-status-paid {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.cco-status-in_production {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
}

.cco-status-shipped {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.cco-status-delivered {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.cco-status-cancelled {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

/* Order Detail */
.cco-order-detail {
    max-width: 1100px;
    margin: 0 auto;
}

.cco-order-detail-header {
    margin-bottom: 2rem;
}

.cco-back-link {
    display: inline-flex;
    align-items: center;
    color: var(--cco-text-gray);
    margin-bottom: 1rem;
    text-decoration: none;
}

.cco-back-link:hover {
    color: var(--cco-pink-300);
}

.cco-order-detail-header h1 {
    display: inline;
    margin-right: 1rem;
}

.cco-order-detail-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 1.5rem;
}

@media (max-width: 900px) {
    .cco-order-detail-grid {
        grid-template-columns: 1fr;
    }
}

.cco-card {
    background: var(--cco-glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--cco-glass-border);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.cco-card h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.cco-card h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.cco-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.5rem;
}

.cco-images-grid img,
.cco-image-link img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 0.5rem;
    transition: transform 0.3s ease;
}

.cco-image-link:hover img {
    transform: scale(1.05);
}

/* Messages / Chat */
.cco-messages {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 1rem;
    padding-right: 0.5rem;
}

.cco-no-messages {
    color: var(--cco-text-muted);
    text-align: center;
    padding: 2rem;
}

.cco-message {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 0.75rem;
}

.cco-message-admin,
.cco-message-system {
    background: rgba(139, 92, 246, 0.1);
    border-left: 3px solid var(--cco-purple-500);
}

.cco-message-client,
.cco-message-user {
    background: rgba(236, 72, 153, 0.1);
    border-left: 3px solid var(--cco-pink-500);
}

.cco-message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.cco-message-header strong {
    color: white;
}

.cco-message-header span {
    color: var(--cco-text-muted);
}

.cco-message-content {
    color: var(--cco-text-gray);
}

.cco-message-form {
    display: flex;
    gap: 0.5rem;
}

.cco-message-form textarea {
    flex: 1;
    min-height: 60px;
    resize: vertical;
}

/* Quote Card */
.cco-quote-card {
    text-align: center;
}

.cco-quote-amount {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--cco-gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.cco-quote-message {
    color: var(--cco-text-gray);
    margin-bottom: 1.5rem;
}

.cco-paid-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(16, 185, 129, 0.2);
    border-radius: 0.5rem;
    color: #34d399;
    font-weight: 600;
}

/* Timeline */
.cco-timeline {
    position: relative;
    padding-left: 1.5rem;
}

.cco-timeline::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--cco-glass-border);
}

.cco-timeline-item {
    position: relative;
    padding-bottom: 1rem;
}

.cco-timeline-dot {
    position: absolute;
    left: -1.5rem;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--cco-glass-border);
}

.cco-timeline-done .cco-timeline-dot {
    background: var(--cco-pink-500);
}

.cco-timeline-item span {
    display: block;
    color: var(--cco-text-light);
}

.cco-timeline-item small {
    color: var(--cco-text-muted);
    font-size: 0.75rem;
}

/* Alerts */
.cco-alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.cco-alert-success {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid #10b981;
    color: #34d399;
}

.cco-alert-warning {
    background: rgba(234, 179, 8, 0.2);
    border: 1px solid #eab308;
    color: #fbbf24;
}

.cco-alert .dashicons {
    font-size: 1.5rem;
    width: 1.5rem;
    height: 1.5rem;
}

/* Auth Pages */
.cco-auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 2rem;
}

.cco-auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--cco-glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--cco-glass-border);
    border-radius: 1rem;
    padding: 2rem;
}

.cco-auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.cco-auth-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: var(--cco-gradient);
    margin-bottom: 1rem;
}

.cco-auth-icon .dashicons {
    font-size: 2rem;
    width: 2rem;
    height: 2rem;
    color: white;
}

.cco-auth-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.cco-auth-header p {
    color: var(--cco-text-gray);
    margin: 0;
}

.cco-auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--cco-glass-border);
}

.cco-auth-footer p {
    color: var(--cco-text-gray);
    margin: 0;
}

.cco-auth-footer a {
    color: var(--cco-pink-300);
    font-weight: 500;
}

.cco-auth-footer a:hover {
    text-decoration: underline;
}

/* Login Required */
.cco-login-required {
    text-align: center;
    padding: 3rem;
    background: var(--cco-glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--cco-glass-border);
    border-radius: 1rem;
}

.cco-login-required p {
    margin-bottom: 1.5rem;
    color: var(--cco-text-gray);
}

.cco-login-required .cco-btn {
    margin: 0 0.5rem;
}

/* Loading Spinner */
.cco-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: cco-spin 0.8s linear infinite;
}

@keyframes cco-spin {
    to {
        transform: rotate(360deg);
    }
}
