/* Appwrite Documents Frontend Styles */

.appwrite-upload-container {
    margin: 20px 0;
    max-width: 700px;
}

.appwrite-form-title {
    color: #2c3e50;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
    text-align: center;
}

.appwrite-form-description {
    color: #7f8c8d;
    font-size: 16px;
    text-align: center;
    margin-bottom: 30px;
    line-height: 1.5;
}

.appwrite-upload-form {
    background: #f9f9f9;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 15px;
}

.appwrite-form-group {
    margin-bottom: 15px;
}

.appwrite-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.appwrite-form-group input[type="file"],
.appwrite-form-group input[type="text"],
.appwrite-form-group input[type="email"],
.appwrite-form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
}

.appwrite-form-group input[type="file"]:focus,
.appwrite-form-group input[type="text"]:focus,
.appwrite-form-group input[type="email"]:focus,
.appwrite-form-group select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.appwrite-help-text {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* Buttons */
.appwrite-btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.appwrite-btn-primary {
    background: linear-gradient(135deg, #007cba 0%, #0056b3 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 124, 186, 0.3);
}

.appwrite-btn-primary:hover {
    background: linear-gradient(135deg, #005a87 0%, #004085 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 124, 186, 0.4);
}

.appwrite-btn-large {
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    max-width: 300px;
    margin: 20px auto 0;
    display: block;
}

.appwrite-btn-secondary {
    background: #666;
    color: #fff;
}

.appwrite-btn-secondary:hover {
    background: #555;
    color: #fff;
}

.appwrite-btn-danger {
    background: #dc3545;
    color: #fff;
}

.appwrite-btn-danger:hover {
    background: #c82333;
    color: #fff;
}

.appwrite-btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

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

/* Spinner */
.appwrite-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ccc;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: appwrite-spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes appwrite-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Messages */
.appwrite-message {
    padding: 10px 15px;
    border-radius: 4px;
    margin: 10px 0;
}

.appwrite-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.appwrite-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.appwrite-loading {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

.appwrite-no-files {
    text-align: center;
    padding: 20px;
    color: #999;
    font-style: italic;
}

/* Global Messages */
.appwrite-global-message {
    position: fixed;
    top: 32px;
    right: 20px;
    z-index: 9999;
    min-width: 250px;
    padding: 12px 18px;
    border-radius: 4px;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.appwrite-global-message.appwrite-success {
    background: #28a745;
    color: #fff;
    border: none;
}

.appwrite-global-message.appwrite-error {
    background: #dc3545;
    color: #fff;
    border: none;
}

/* Files List */
.appwrite-files-container {
    margin: 20px 0;
}

.appwrite-files-header {
    margin-bottom: 15px;
}

.appwrite-files-list {
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
}

.appwrite-file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.appwrite-file-item:last-child {
    border-bottom: none;
}

.appwrite-file-info {
    flex: 1;
}

.appwrite-file-name {
    margin-bottom: 5px;
}

.appwrite-file-link {
    font-weight: 600;
    color: #007cba;
    text-decoration: none;
}

.appwrite-file-link:hover {
    text-decoration: underline;
}

.appwrite-file-meta {
    font-size: 12px;
    color: #666;
}

.appwrite-file-meta span {
    margin-right: 15px;
}

.appwrite-file-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Responsive */
@media (max-width: 768px) {
    .appwrite-upload-container {
        max-width: 100%;
    }
    
    .appwrite-upload-form {
        padding: 15px;
    }
    
    .appwrite-file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .appwrite-file-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .appwrite-global-message {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .appwrite-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .appwrite-btn-sm {
        padding: 5px 10px;
        font-size: 11px;
    }
}