/**
 * Public styles for HD Secure Upload
 */

.hd-secure-upload-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.hd-secure-upload-container * {
    box-sizing: border-box;
}

/* Header */
.hd-secure-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.hd-secure-user-info {
    color: #333;
}

.hd-secure-logout {
    color: #666;
    text-decoration: none;
    font-size: 14px;
}

.hd-secure-logout:hover {
    color: #d63638;
    text-decoration: underline;
}

/* Forms */
.hd-secure-form {
    margin: 0;
}

.hd-secure-form-group {
    margin-bottom: 20px;
}

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

.hd-secure-form-group input[type="email"],
.hd-secure-form-group input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.hd-secure-form-group input[type="email"]:focus,
.hd-secure-form-group input[type="text"]:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

/* Buttons */
.hd-secure-button {
    display: inline-block;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.hd-secure-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.hd-secure-button-primary {
    background-color: #007cba;
    color: #fff;
}

.hd-secure-button-primary:hover:not(:disabled) {
    background-color: #006ba1;
}

.hd-secure-button-primary:active:not(:disabled) {
    transform: translateY(1px);
}

.hd-secure-button-danger {
    background-color: #d63638;
    color: #fff;
    padding: 8px 12px;
    font-size: 14px;
}

.hd-secure-button-danger:hover:not(:disabled) {
    background-color: #b32d2e;
}

/* Messages */
.hd-secure-message {
    padding: 12px 15px;
    border-radius: 6px;
    margin-top: 15px;
}

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

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

.hd-secure-message.hd-secure-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Login Form */
.hd-secure-login-form {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.hd-secure-login-form h3 {
    margin: 0 0 10px;
    font-size: 24px;
    color: #333;
}

.hd-secure-description {
    margin: 0 0 25px;
    color: #666;
}

/* Dropzone */
.hd-secure-dropzone {
    position: relative;
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

.hd-secure-dropzone:hover,
.hd-secure-dropzone.hd-secure-dragover {
    border-color: #007cba;
    background-color: #f0f7fb;
}

.hd-secure-dropzone-icon {
    color: #999;
    margin-bottom: 15px;
}

.hd-secure-dropzone-text {
    margin: 0 0 8px;
    font-size: 16px;
    color: #333;
}

.hd-secure-dropzone-info {
    margin: 0;
    font-size: 13px;
    color: #888;
}

.hd-secure-file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* File Preview */
.hd-secure-file-preview {
    margin: 15px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 6px;
}

.hd-secure-file-preview-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.hd-secure-file-preview-item:last-child {
    border-bottom: none;
}

.hd-secure-file-preview-name {
    flex: 1;
    font-size: 14px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hd-secure-file-preview-size {
    margin-left: 15px;
    font-size: 13px;
    color: #888;
}

.hd-secure-file-preview-remove {
    margin-left: 10px;
    padding: 4px 8px;
    background: none;
    border: none;
    color: #d63638;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.hd-secure-file-preview-remove:hover {
    color: #b32d2e;
}

/* Sections */
.hd-secure-upload-section,
.hd-secure-files-section {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.hd-secure-upload-section h3,
.hd-secure-files-section h3 {
    margin: 0 0 20px;
    font-size: 20px;
    color: #333;
}

/* Files Toolbar */
.hd-secure-files-toolbar {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.hd-secure-search-wrapper {
    flex: 1;
    min-width: 200px;
}

.hd-secure-search-input {
    width: 100%;
    padding: 10px 15px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.hd-secure-search-input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

.hd-secure-sort-wrapper {
    flex-shrink: 0;
}

.hd-secure-sort-select {
    padding: 10px 35px 10px 15px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.hd-secure-sort-select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

/* Files List */
.hd-secure-files-list {
    min-height: 100px;
}

.hd-secure-loading {
    text-align: center;
    padding: 20px;
    color: #888;
}

.hd-secure-no-files {
    text-align: center;
    padding: 30px;
    color: #888;
    font-style: italic;
}

.hd-secure-file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 6px;
    margin-bottom: 10px;
}

.hd-secure-file-item:last-child {
    margin-bottom: 0;
}

.hd-secure-file-info {
    flex: 1;
    min-width: 0;
}

.hd-secure-file-name {
    font-weight: 600;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 4px;
}

.hd-secure-file-meta {
    font-size: 13px;
    color: #888;
}

.hd-secure-file-actions {
    display: flex;
    gap: 8px;
    margin-left: 15px;
}

.hd-secure-file-actions a,
.hd-secure-file-actions button {
    padding: 8px 12px;
    font-size: 14px;
    border-radius: 4px;
    text-decoration: none;
}

.hd-secure-file-download {
    background-color: #007cba;
    color: #fff;
    border: none;
}

.hd-secure-file-download:hover {
    background-color: #006ba1;
    color: #fff;
}

.hd-secure-file-delete {
    background-color: transparent;
    color: #d63638;
    border: 1px solid #d63638;
    cursor: pointer;
}

.hd-secure-file-delete:hover {
    background-color: #d63638;
    color: #fff;
}

/* Responsive */
@media (max-width: 480px) {
    .hd-secure-upload-container {
        padding: 10px;
    }

    .hd-secure-login-form,
    .hd-secure-upload-section,
    .hd-secure-files-section {
        padding: 20px;
    }

    .hd-secure-files-toolbar {
        flex-direction: column;
    }

    .hd-secure-search-wrapper {
        min-width: 100%;
    }

    .hd-secure-sort-select {
        width: 100%;
    }

    .hd-secure-file-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .hd-secure-file-actions {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
    }

    .hd-secure-file-actions a,
    .hd-secure-file-actions button {
        flex: 1;
        text-align: center;
    }
}
