/*
'''
    Copyright 2018 Adi Hezral (hezral@gmail.com)
    This file is part of Clips ("Application").
    The Application is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.
    The Application is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
    You should have received a copy of the GNU General Public License
    along with this Application.  If not, see <http://www.gnu.org/licenses/>.
'''
*/

/* -- colors -- */
/* ------------------------------ */
@define-color shaded_dark rgba(0, 0, 0, 0.02);
@define-color shaded_darker shade(@theme_base_color, 0.85);
@define-color shaded_base shade(#6A0CAB, 0.98);
@define-color popup shade(@theme_base_color, 0.98);
@define-color bordercolor rgba(0, 0, 0, 0.3);
@define-color basecolor rgba(125, 48, 232, 1);


/* ------------------------------ */

/* -- app styling -- */
window, decoration, grid#main-view, stack {
    border-bottom-right-radius: 6px;
    border-bottom-left-radius: 6px;
}

grid#main-view {
    border-bottom-right-radius: 4px;
    border-bottom-left-radius: 4px;
}

grid#view-switch {
    padding-right: 4px;
}

grid#app-statusbar {
    padding: 4px;
    font-size: 90%;
    opacity: 0.75;
}

/* -- headerbar -- */
.header-label {
    font-size: larger;
    font-weight: bold;
}

grid#search-bar {
    padding: 1px;
    }
    
entry#search-entry {
    box-shadow: none;
    background-image: none;
    background: transparent;
    border-style: none;
    padding: 5px;
    padding-top: 7px;
    padding-bottom: 7px;
    text-shadow: none;
}

entry#search-entry-active {
    padding: 4px;
    padding-top: 6px;
    padding-bottom: 6px;
    text-shadow: none;
}




/* -- stack -- */
/* ------------------------------ */
stack {
    border-bottom-right-radius: 4px;
    border-bottom-left-radius: 4px;
}
/* ------------------------------ */



/* -- settings-view -- */
/* ------------------------------ */
/* .stack-settings, .headerbar-settings, .main_view-settings {
    background-color: @shaded_dark;
} */

label#settings-group-label {
    font-weight: bold;
    opacity: 0.75;
}

frame#settings-group-frame {
    border-radius: 4px;
    border-color: rgba(0, 0, 0, 0.3);
    background-color: @shaded_dark;
}

.settings-sub-label {
    /* font-style: italic; */
    font-size: 0.9em;
    color: gray;
}

.alternate-row {
    background-color:rgba(125, 48, 232, 0.05);
}
/* ------------------------------ */

@keyframes crossfader {
    0% { opacity: 0; } 
    03.33% { opacity: 0; }
    06.66% { opacity: 0; }
    09.99% { opacity: 0; }
    13.33% { opacity: 0; }
    16.65% { opacity: 0.75; }
    100% { opacity: 1; }	
}

grid#plaintext-container {
    font-size: 95%;
}

grid#html-container, grid#spreadsheet-container {
    padding: 4px;
}

.clip-container-animated {
    animation: crossfader 0.5s ease-in-out forwards;
}

.hover {
    border-radius: 5px;
    box-shadow:
        0 0 0 1px rgba(125, 48, 232, 1),
        0 2px 5px  rgba(0,0,0,0.16),
        0 2px 5px  rgba(0,0,0,0.23),
        0 14px 28px  rgba(0,0,0,0);
}

.clip-containers, grid#clip-container-grid {
    border-radius: 4px;
}
    
flowbox#flowbox > flowboxchild {
    border-radius: 5px;
    border-style: solid;
    border-width: 1px;
    border-color: rgba(0,0,0,0.3);
    background-color: transparent;
    animation: crossfader 0.25s ease-in-out forwards;
}

flowbox#flowbox > flowboxchild:selected {
    border-color: rgba(125,48,232,1);
    box-shadow:
        0 0 0 1px rgba(0,0,0,0.12),
        0 2px 5px  rgba(0,0,0,0.16),
        0 2px 5px  rgba(0,0,0,0.23),
        0 14px 28px  rgba(0,0,0,0);
    background-color: rgba(125, 48, 232, 0.15);
}

flowboxchild:selected > widget#clip-container > grid#clip-container-grid > grid#clip-info {
    text-shadow: 0px 1px 2px rgba(0,0,0, 0.5);
    background-color: rgba(255,255,255,0.2);
}

flowboxchild:selected > widget#clip-container > grid#clip-container-grid {
    border-color: rgba(125, 48, 232, 1);
}

flowboxchild:backdrop > widget#clip-container > grid#clip-container-grid > grid#clip-info {
    text-shadow: 0px 1px 2px rgba(0,0,0, 0.2);
}


/* .gridhover {
    border-color: rgba(125, 48, 232, 1);
} */

flowbox {
    padding: 10px;
}

grid#clips-multi-delete {
    background-color: alpha(@theme_base_color, 0.85);
}

.clip-select {
    opacity: 0.5;
}

.clip-select:hover {
    opacity: 1;
}

.clip-selected {
    /* color: rgba(125, 48, 232, 1); */
    opacity: 1;
}


/* flowboxchild {
    transition: all 150ms ease-in-out;
} */

grid#clip-info {
    background-color: rgba(125, 48, 232, 0.75);
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    border-style: none;
    color: white;
}

grid#clip-action {
    background-color: rgba(125, 48, 232, 0.75);
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    border-style: none;
    color: white;
}

label#clip-timestamp, label#clip-content-label {
    font-size: 80%;
    font-weight: bold;
}

box#clip-content-box {
    font-size: 85%;
}

button#clip-action-button {
    box-shadow: none;
    border-style: none;
    padding: 4px;
    color: white;
    background: none;
    -gtk-icon-effect: none;
}

.clip-action-disabled {
    opacity: 0.35;
}

/* button#clip-action-button > widget > box > label {
    padding-left: 2px;
} */

/* button#clip-action-button:hover {
    border-style: solid;
    border-width: 1px;
    border-color: rgba(255,255,255,0.75); 
    border-radius: 3px;
    background-color: rgba(0,0,0,0.35);
    opacity: 1;
   
} */
    
/* button#clip-action-button:active {
    border-color: rgba(255,255,255,0.5);
    background-color: rgba(0,0,0,0.7);
    opacity: 0.55;
   
}

button#clip-action-button:disabled {
    text-shadow: none;
}
     */

grid#clip-action-notify {
    background-color: rgba(0,0,0,0.75);
    color: white;
    padding: 8px;
    padding-left: 12px;
    padding-right: 12px;
    border-radius: 3px;
    font-weight: bold;
}

button#app-action-enable, button#app-action-protect {
    border-style: none;
    box-shadow: none;
    padding: 2px;
}

.app-action-enabled {
    opacity: 1;
}

.app-action-disabled {
    opacity: 0.35;
}

button#app-action-enable:hover, button#app-action-protect:hover {
    opacity: 0.75;
}

button#app-action-enable:active, button#app-action-protect:active {
    opacity: 1;
}

label#color-container-content {
    letter-spacing: 1px; 
    font-weight: bold; 
    font-size: 120%; 
    opacity: 0.8;
}

label#url-container-title, label#mail-container-title{
    letter-spacing: 1px; 
    font-weight: bold; 
    font-size: 105%; 
}

label#files-container-more {
    font-weight: bold;
    background-color: rgba(125, 48, 232, 1);
    padding: 8px;
    border-radius: 24px;
    border-width: 1px;
    border-color: rgba(125, 48, 232, 1);
    border-style: solid;
    color: white;
}

.info-view-fader {
    animation: crossfader 0.5s ease-in-out forwards;
}

label#welcome-view-title, label#noclips-view-title {
    color: alpha(@theme_text_color, 0.6);
    animation: crossfader 1.0s ease-in-out forwards;
}

label#welcome-view-sublabel, label#noclips-view-sublabel {
    color: alpha(@theme_text_color, 0.5);
    animation: crossfader 1.25s ease-in-out forwards;
}

grid#setpassword {
    animation: crossfader 1.5s ease-in-out forwards;
}

/* grid#protected-container {
    font-weight: bold;
    letter-spacing: 2px;
    color: alpha(red, 0.75);
} */

button#setpassword, button#revealpassword {
    outline-style: none;
}
  
button#setpassword:active, button#revealpassword:active {
    opacity: 0.75;
}

@keyframes fade-in {
    0% { opacity: 0.35; } 
    03.33% { opacity: 0.35; }
    06.66% { opacity: 0.35; }
    09.99% { opacity: 0.35; }
    13.33% { opacity: 0.35; }
    16.65% { opacity: 0.5; }
    100% { opacity: 1; }	
}

@keyframes fade-out {
    0% { opacity: 1; } 
    03.33% { opacity: 1; }
    06.66% { opacity: 1; }
    09.99% { opacity: 1; }
    13.33% { opacity: 1; }
    16.65% { opacity: 0.5; }
    100% { opacity: 0.35; }	
}

.setpassword-waiting {
    opacity: 0.35;
    animation: fade-out 0.2s ease-in-out forwards;
}
  
.setpassword-ready {
    animation: fade-in 0.2s ease-in-out forwards;
    opacity: 1;
}

/* ------------------------------ */

.checkerboard {
    background-image:
      linear-gradient(45deg, rgba(0,0,0,0.1) 25%, transparent 25%), 
      linear-gradient(135deg, rgba(0,0,0,0.1) 25%, transparent 25%),
      linear-gradient(45deg, transparent 75%, rgba(0,0,0,0.1) 75%),
      linear-gradient(135deg, transparent 75%, rgba(0,0,0,0.1) 75%);
    background-size:24px 24px; /* Must be a square */
    background-position:0 0, 12px 0, 12px -12px, 0px 12px; /* Must be half of one side of the square */
}

image#clip-source-app-icon-overlay {
    -gtk-icon-shadow: 0 2px 24px rgba(0, 0, 0, 0.2), 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* scrolledwindow > undershoot.top {
    background-blend-mode: normal;
    background-clip: border-box;
    background-color: rgba(0,0,0,0);
    background-image: linear-gradient(@theme_base_color 0, alpha(@theme_base_color, 0) 50%);
    background-origin: padding-box;
    background-position: left top;
    background-repeat: repeat;
    background-size: auto;
}

scrolledwindow > undershoot.bottom {
    background-blend-mode: normal;
    background-clip: border-box;
    background-color: rgba(0,0,0,0);
    background-image: linear-gradient(alpha(@theme_base_color, 0) 50%, @theme_base_color 100%);
    background-origin: padding-box;
    background-position: left top;
    background-repeat: repeat;
    background-size: auto;
} */